#define  _CRT_SECURE_NO_WARNINGS 1
#include<iostream>

typedef int SDataType;
class Stack
{

public:
	Stack(int n=4)
	{
		_arr = (SDataType*)malloc(sizeof(SDataType) * n);
		if (_arr == nullptr)
		{
			perror("_arr fail!");
			exit(1);
		}
		_top = 0;
		_capacity = n;
	}
	~Stack()
	{
		free(_arr);
		_arr = nullptr;
		_top = _capacity = 0;
	}


private:

	SDataType* _arr;
	int _top;
	int _capacity;


	
};
int main()
{

	Stack st1(8);


	return 0;
}